package day15_Thread.demo06_Thread;
//void setDaemon(boolean on)	将此线程标记为守护线程,当运行的线程都是守护线程时,Java虚拟机将退出
public class MyThread extends Thread{
    @Override
    public void run() {
        for (int i = 1; i <=50 ; i++) {
            System.out.println(Thread.currentThread().getName()+":"+i);
        }
    }

    public MyThread() {
    }

    public MyThread(String name) {
        super(name);
    }
}
